{include file = 'Public/header.html' title='修改密码'}
{include file = "Public/sidebar.html"}
<!-- 主内容 start -->
<div id="content" class="span10">
  <!-- 标题 start -->
  <div class="pageTit page-header">
    <h1>修改密码</h1>

  </div>
  <!-- 标题 end -->
  <!-- 内容区块 start -->
  <div class="formBox">
      <form id="addform" action="{U('password/save')}" method="post" enctype="multipart/form-data">
                
        <div class="control-group">
          <label>原始密码：</label>
          <input type="password"  name="old_user_password" value=""  placeholder="请输入原始密码" datatype="s6-20" nullmsg="请输入原始密码！" errormsg="请输入6-20个字符" />
          <span class="Validform_checktip"></span>
        </div>
        
        <div class="control-group">
          <label>新密码：</label>
          <input type="password"  name="new_user_password" value=""  placeholder="请输入6-20位新密码" datatype="s6-20" nullmsg="请输入新密码！" errormsg="密码只能为6-20位数字、字母、下划线" />
          <span class="Validform_checktip"></span>
        </div>
        
        
        <div class="control-group">
          <label>确认密码：</label>
          <input type="password"  name="re_user_password" value=""  placeholder="请输入6-20位确认密码" datatype="s6-20"  recheck="new_user_password" nullmsg="请输入确认密码！" errormsg="两次输入不一致，请确认密码" />
          <span class="Validform_checktip"></span>
        </div>

        <div class="control-group">
          <img style="display:none;" src="{STATIC_IMAGE}/loading.gif" />
          <input type="submit" class="btn btn-primary Sub" value="保存" />
        </div>
    </form>
  </div>
  <!-- 内容区块 end -->
</div>
<!-- 主内容 end -->

<script>
$(function(){
  //提交表单合法性验证 
    $("#addform").Validform({ 
    tiptype:function(msg,o,cssctl){ 
      if(!o.obj.is("form")){ 
          var objtip=o.obj.siblings(".Validform_checktip");
          cssctl(objtip,o.type);
          objtip.text(msg); 
      }
    },
    label:"label",
    ajaxPost:true,
    callback:function(data){
      if(data.status=="ok"){
          alert(data.info);
          window.location.href = "{U('admin/logout/index')}";
      }else{
          alert(data.info);
      }
    }
  });
})
</script>
   
    <!-- 主容器 end -->
{include file="Public/footer.html"}